<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="../../common/tagInclude.jsp" %>
<%@include file="../../common/headerInclude.jsp" %>
<title>用户信息<c:choose><c:when test="${opt == 'update'}">修改</c:when><c:otherwise>添加</c:otherwise></c:choose></title>
<script type="text/javascript">
	$(function() {
		$("#jvForm").validate();
	});
</script>
<script type="text/javascript" src="${basePath}res/common/js/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
<div class="body-box">
	<div class="rhead">
		<div class="rpos">当前位置: 首页 - 用户 - 用户信息<c:choose><c:when test="${opt == 'update'}">修改</c:when><c:otherwise>添加</c:otherwise></c:choose></div>
		<div class="clear"></div>
	</div>
	<form method="post" action="${basePath}super/user/user-${opt}.do" id="jvForm">
		<input type="hidden" id="userId" name="userId" value="${user.id}"/>
		<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1" border="0">
			<tbody>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired">*</span>角色:</td>
				<td width="85%" class="pn-fcontent">
					<select id="roleId" name="roleId" class="required">
						<option value="">请选择角色</option>
						<c:forEach items="${roleList}" var="role">
							<option value="${role.roleId}"  <c:if test="${user.roleId == role.roleId}">selected</c:if>>${role.roleName}</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired">*</span>用户:</td>
				<td width="85%" class="pn-fcontent">
					<input type="text" maxlength="100" name="username" id="username" class="required" size="80" value="${user.username}" <c:if test="${opt=='update'}">readonly="readonly"</c:if>>
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired"><c:if test="${opt=='create'}">*</c:if></span>密码:</td>
				<td width="85%" class="pn-fcontent">
					<input type="password" maxlength="100" name="password" id="password" <c:if test="${opt=='create'}">class="required"</c:if> size="80" value="">
					<c:if test="${opt=='update'}">留空不进行密码修改</c:if>
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired"><c:if test="${opt=='create'}">*</c:if></span>密码确认:</td>
				<td width="85%" class="pn-fcontent">
					<input type="password" maxlength="100" name="passwordComfrim" id="passwordComfrim" <c:if test="${opt=='create'}">class="required"</c:if> size="80" value="">
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired">*</span>姓名:</td>
				<td width="85%" class="pn-fcontent">
					<input type="text" maxlength="100" name="realName" id="realName" class="required" size="80" value="${user.realName}">
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired">*</span>部门:</td>
				<td width="85%" class="pn-fcontent">
					<input type="text" maxlength="100" name="deptName" id="deptName" class="required" size="80" value="${user.deptName}">
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired">*</span>固定电话:</td>
				<td width="85%" class="pn-fcontent">
					<input type="text" maxlength="100" name="telphone" id="telphone" class="required" size="80" value="${user.telphone}">
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired">*</span>移动电话:</td>
				<td width="85%" class="pn-fcontent">
					<input type="text" maxlength="100" name="mobilephone" id="mobilephone" class="required" size="80" value="${user.mobilephone}">
				</td>
			</tr>
			<tr>
				<td width="15%" class="pn-flabel pn-flabel-h"><span class="pn-frequired"></span>电子邮箱:</td>
				<td width="85%" class="pn-fcontent">
					<input type="text" maxlength="100" name="email" id="email" size="80" value="${user.email}">
				</td>
			</tr>
			<tr>
				<td colspan="2" class="pn-fbutton">
					<input type="submit" value="提交"> &nbsp; <input type="reset" value="重置">
				</td>
			</tr>
			</tbody>
		</table>
	</form>
</div>
</body>
</html>